package device;

import interfaces.IRemoteNode;

/**
 * @author Stefano&Davide
 * @version 1.0
 */

public class RemoteNode implements IRemoteNode {

	private String ip;
	private int port;
	private int protocol;
	
	public RemoteNode(String ip,int port,int protocol){
		this.ip=ip;
		this.port=port;
		this.protocol=protocol;
	}
	
	@Override
	public String getIp() {
		return ip;
	}

	@Override
	public int getPort() {
		return port;
	}

	@Override
	public int getProtocol() {
		return protocol;
	}
	
	@Override
	public boolean equals(Object o){
		RemoteNode node=(RemoteNode) o;
		return ip.equals(node.getIp())&& port==node.getPort()&&protocol==node.getProtocol();
	}

}
